package com.jk.lyt.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jk.lyt.pojo.UserBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserDao extends BaseMapper<UserBean> {


    @Select("select * from tb_user where username = #{username}")
    UserBean selectToId(String username);

    @Insert("insert into tb_user values(null,#{username},#{password},#{userPhone},#{email},#{usertype})")
    void Register(UserBean bean);
}
